/**
 * @file src/datatypes/Timer.java
 */
package datatypes;

/**
 * Timer class for simulated annealing
 */
public class MyTimer
{
	/** time when was started */
	private long mStartTime;

	/**
	 * default constructor
	 */
	public MyTimer()
	{
		mStartTime = 0;
	}
	
	/**
	 * start timer
	 */
	public void start()
	{
		mStartTime = System.currentTimeMillis();
	}

	/**
	 * Get current duration since start in milliseconds
	 * 
	 * @return duration time in milli seconds
	 */
	public long getDuration()
	{
		return (System.currentTimeMillis() - mStartTime);
	}
	

} // class Timer
